package com.hsc.www.validator.test4;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;


@Data
@NoArgsConstructor
@AllArgsConstructor
public class Staff {

    private String id;

    @NotEmpty(message = "姓名不能为空")
    private String name;

    @Valid
    @NotNull(message = "地址不能为空")
    private Address address;
}
